package com.mis.pos.entity;

import com.mis.pos.base.entity.BaseEntity;
import lombok.Data;

import javax.persistence.Entity;
import javax.persistence.Table;
import java.io.Serializable;

/**
 * @Description 商品订单关联表
 * @Author yuxiang
 * @CreatedDate 2019/10/30 16:20
 */
@Entity
@Table(name = "sale_item")
@Data
public class SaleItemEntity extends BaseEntity implements Serializable {
    /**
     * 商品id
     */
    private Long itemId;
    /**
     * 订单id
     */
    private Long saleId;

    /**
     * 商品数量
     */
    private Long itemNumber;

    public Long getItemId() {
        return itemId;
    }

    public void setItemId(Long itemId) {
        this.itemId = itemId;
    }

    public Long getSaleId() {
        return saleId;
    }

    public void setSaleId(Long saleId) {
        this.saleId = saleId;
    }

    public Long getItemNumber() {
        return itemNumber;
    }

    public void setItemNumber(Long itemNumber) {
        this.itemNumber = itemNumber;
    }

    public SaleItemEntity() {
    }

    public SaleItemEntity(Long itemId, Long saleId,Long itemNumber) {
        this.itemNumber = itemNumber;
        this.itemId =itemId;
        this.saleId  = saleId;
    }

    public SaleItemEntity(Long itemId, Long saleId) {
        this.itemId = itemId;
        this.saleId = saleId;
    }
}
